//
//  VideoListModelCell.m
//  Video
//
//  Created by lanou3g on 16/5/11.
//  Copyright © 2016年 liu. All rights reserved.
//

#import "VideoListModelCell.h"
#import "UIImageView+WebCache.h"
#import "VideoPlayView.h"
#import "LoginViewController.h"
#import "UserInfoManager.h"


#import "UMSocial.h"


@interface VideoListModelCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *coverImageView;
@property (weak, nonatomic) IBOutlet UIImageView *topicImgView;
@property (weak, nonatomic) IBOutlet UILabel *topicNameLabel;

@end


@implementation VideoListModelCell
- (void)awakeFromNib {
    // Initialization code
}


- (void)layoutSubviews {
    self.titleLabel.text = self.model.title;
    self.topicNameLabel.text = self.model.topicName;
    [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:self.model.cover]];
    [self.topicImgView sd_setImageWithURL:[NSURL URLWithString:self.model.topicImg]];
    
    self.topicImgView.layer.cornerRadius = 15;
    self.topicImgView.layer.masksToBounds = YES;
}

- (IBAction)didClickStartPlayer:(UIButton *)sender {
    
    if ([self.playerDelegate respondsToSelector:@selector(clickVideoButton:)]) {
        [self.playerDelegate clickVideoButton:self.indexPath];
    }
}


    


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
